<template>
  <div class="about">
    <el-table :data="tableData">
      <i @click="del(tableSlot)" slot-scope="tableSlot">删除</i>
    </el-table>
  </div>
</template>
<script>
import elTable from '../components/elTable.vue'
export default {
  components:{
    elTable
  },
  data(){
    return {
      tableData:[
        {name:'张三',age: 18,phone: 1456789,sex:'男'},
        {name:'李四',age: 18,phone: 1456789,sex:'男'},
        {name:'王五',age: 18,phone: 1456789,sex:'男'},
        {name:'马六',age: 18,phone: 1456789,sex:'男'},
        {name:'七郎',age: 18,phone: 1456789,sex:'男'}
      ]
    }
  },
  methods: {
    del(val){
      console.log(val);
      this.tableData.splice(val.row,1)
    }
  },
}
</script>